<%inherits "Discuz.Album.Pages.showalbum"%>
<%template _albumheader%>

<%if page_err==0%>
	<%template _albumnavigation%>
	<div id="foruminfo">
		<div id="userinfo">
			<a href="{config.albumurl}" id="NavHome" onmouseover="showMenu(this.id);" onmouseout="showMenu(this.id);">{config.albumname}首页</a>  &raquo;  <a href="{albumurl}showalbumlist.aspx?cate={albumcategory.albumcateid}">{albumcategory.title}</a>  &raquo;  {album.title}
		</div>
		 <div id="headsearch">
			<div id="search">
				<%template _quicksearch%>
			</div>
	    </div>
	</div> 
	{navhomemenu}
	<div id="ntforumbody">
		<%if {!needpassword}%>
			<div class="modulebox">
					<div class="forumtitle spacetitle">
						<h2>						
							{album.title}	<strong>
							<script type="text/javascript">
								document.write(window.location);
							</script>
							</strong>(<a href="###" onclick="setcopy(window.location.href.replace('###','') + '&page={currentpage}', '已经复制到剪贴板');" class="copylink">复制到剪帖板</a>)
						</h2>
						<em>
						<%if {config.silverlight}==1%>
							<a id="silverlightalbum" target="_blank" title="Silverlight相册展示" href="silverlight/album/index.html?albumid={album.albumid}"><img src="templates/{templatepath}/images/album/button_seeit.gif" alt="展开" /></a>
						<%/if%>
						 </em>
					</div>
					<div class="controlPhoto">
						<p>
							<%if {config.enablespace}==1%><a href="{spaceurl}space/?uid={album.userid}" target="_blank"><img src="templates/{templatepath}/images/album/dotspace.gif" />{album.username}的空间</a><%/if%>
							<%set {aspxrewriteurl} = this.UserInfoAspxRewrite({album.userid})%>
							<a href="{forumurl}{aspxrewriteurl}"><img src="templates/{templatepath}/images/album/user_info.gif"  alt="用户信息:"/>{album.username}的用户资料</a>
							<a href="{albumurl}showalbumlist.aspx?uid={album.userid}"><img src="templates/{templatepath}/images/album/user_album.gif"  alt="用户相册"/>{album.username}的全部相册</a>
						</p>
						<p><%if {album.userid}=={userid}%>
							 <a href="{forumurl}usercpspacemanagephoto.aspx?albumid={album.albumid}" target="_blank"><img src="templates/{templatepath}/images/album/album_edit.gif" />管理</a>
						<%/if%>					
						<a href="{forumurl}favorites.aspx?albumid={album.albumid}"><img src="templates/{templatepath}/images/album/album_fav.gif" alt="收藏" title="收藏" />收藏</a>
						</p>
					</div>

					<%if {photolist.Count}>0%>
						<div class="Photo">
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<%set (int) {photoindex} = 1%>
							<%loop (PhotoInfo) photo photolist%>
								<%if {photoindex}==1%>
									<tr>
								<%/if%>
									<td>
									<div>
										<a href="{albumurl}showphoto.aspx?photoid={photo.photoid}"><img src="{photo.filename}" alt="{photo.title}" title="{photo.title}" /></a>
									</div>
									<p>
										<script language="javascript" type="text/javascript">
											ShowFormatBytesStr({photo.filesize});
										</script>
									</p>
									<h5><a href="{albumurl}showphoto.aspx?photoid={photo.photoid}">{photo.title}</a></h5>
									</td>													
								 <%if {photoindex}==4%>
									</tr>
									<%set {photoindex}=1%>
								 <%else%>
									<%set {photoindex}={photoindex}+1%>
								 <%/if%>
							<%/loop%>
							</table>
						</div>
						<div class="ntforumpage" style="margin-left:45px;">
						{pagenumbers}
						</div>
					<%else%>
						<%template _photomsgbox%>
					<%/if%>
			</div>
		<%else%>
			<div class="modulebox">
				<div class="forumtitle">
					<h2>此相册已被设置密码</h2>
				</div>
				<div class="forumpassword">
					<form id="enteralbum" name="enteralbum" method="post" action="">
							<label for="password">请输入密码:</label><input name="albumpassword" type="password" id="albumpassword" size="20" class="colorblue" onfocus="this.className='colorfocus';" onblur="this.className='colorblue';" />
							<p><input type="submit"  value="确定" class="lightbutton"/></p>
					</form>
				</div>
			</div>
		<%/if%>
	</div>
<%else%>
	<%template _photoerrmsgbox%>
<%/if%>	
<%template _copyright%>
<%template _footer%>
